﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using VideoClubGorbea.Model;
using VideoClubGorbea.Common.Interfaces;
using System.Threading.Tasks;

using VideoClubGorbea.Common.Utils;
using VideoClubGorbea.ServicesClassLibrary;
using VideoClubGorbea.Infraestructure;

namespace VideoClubGorbea.WCF
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    public class MovieServicesWCF : IMovieServices
    {
        private MovieServices services = new MovieServices(new VideoClubGorbeaContextMock());

        public List<Movie> SearchMovies(string title)
        {            
           var result = services.SearchMovies(title);
           return result;
        }

        public List<Movie> GetLatestMovies(int? pageSize)
        {
            var result = services.GetLatestMovies(pageSize);
            return result;
        }

        public Movie GetMovieById(int? id)
        {
            var result = services.GetMovieById(id);
            return result;
        }

       
    }
}
